<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link rel="stylesheet" href="resources/mytheme/css/style.css">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">



<script type="text/javascript">


function onload()
{
	document.mform.titleLabel.style.display = 'none';
}

function removeChars(ename)
{
	var inputString = document.getElementById(ename).value;
	var pass1 = inputString.replace('\'','');
	var pass2 = pass1.replace('\'','');
	var pass3 = pass2.replace('\'','');
	document.getElementById(ename).value = pass3.replace('\"','');
}
</script>

<title>RentFlix Admin: Add Movie</title>
	
</head>
<style type="text/css">
textarea{ resize: none;
		  
}
</style>
<body onload="onload()">
<div id=header2>

	<div id="logo">
		<img src="resources/mytheme/Logo.png" alt="RentFlix">
	</div>
	

	
	<div id="loginBar">
		<ul>
			<li><a class="lastlink" href="logout">Logout</a></li>
			<li><a class="lastlink" href="http://localhost:8080/MovieProject">Home</a> </li>
	    
	    
	        
	        <li><a href="reports">Admin: In-Stock</a> </li>
	        <li><a href="userQueues">Admin: Queues</a> </li>
	        <li><a href="popularMovieReport">Admin: Popular Movies</a> </li>
	        <li><a href="newMovie">Admin: Add Movie</a> </li>
	        <li><a href="CheckInRentals">Admin: Check-In</a> </li>

			
		</ul>
	</div>
</div>
<div id="body3">
    <div align="center">
        <form:form name="mform" action="newMovie" method="post" commandName="movieForm">
            <table border="0">
                <tr>
                    <td colspan="2" align="center"><h2>Admin Add Movie</h2></td>
                </tr>
                <tr>
                    <td>Movie Title: </td>
                    <td><form:input  id="title" title="Movie Title" path="title" style="width: 245px;" required="true" onblur="removeChars('title')" placeholder="Death Blow"/></td>
                </tr>
                <tr>
                    <td>Actors: </td>
                    <td><form:input id="actors" title="Actors" path="actors" style="width: 245px;" required="true" onblur="removeChars('actors')" placeholder="Jerry Seinfeld" /></td>
                </tr>
                <tr>
                    <td>Genre: </td>
                    <td><div class="styled-select2">
	                <form:select path="genre" style="width: 249px;">
					  <option value="Comedy">Comedy</option>
					  <option value="Drama">Drama</option>
					  <option value="Action">Action</option>
					  <option value="Horror">Horror</option>
					  <option value="Horror">Documentary</option>
					  <option value="Family">Family</option>
					</form:select></div>
                </td></tr>
                <tr>
                    <td>Rating: </td>
                    <td><div class="styled-select2">
	                <form:select path="rating" style="width: 249px;">
					  <option value="G">G</option>
					  <option value="PG">PG</option>
					  <option value="PG-13">PG-13</option>
					  <option value="R">R</option>
					</form:select></div>
                </td></tr>
                <tr>
                    <td>Description: </td>
                      <td><form:textarea name="styled-textarea" id="styled" title="Description" path="description" onblur="removeChars('desc')" required="true" placeholder="When someone tries to blow you up, not because of who you are, but for different reasons altogether"/></td>
                </tr>
                <tr>
                    <td>Year: </td>
                      <td><form:input type="number" id="year" title="Year" path="year" style="width: 245px;" onblur="removeChars('year')" required="true" placeholder="2012"/></td>
                </tr>
                 <tr>
                    <td>ImageURL: </td>
                      <td><form:input type="url" title="Image URL" path="imageURL" style="width: 245px;" required="true" placeholder="http://movie.com/img.jpg"/></td>
                </tr>
                
                <tr>
                    <td colspan="2" align="center"><input type="submit" value="Add Movie" /></td>
                </tr>
            </table>
        </form:form>
        
    
        
        
    </div>
    </div>
    <div id="footer">
	<div id="foota">
		<p>Get Help</p>
		<ul>
		  <li><a href="#">FAQ</a></li>
		  <li><a href="#">Help Center</a></li>
		  <li><a href="#">Account</a></li>
		  <li><a href="#">Questions</a></li>
		</ul>
	</div>

	<div id="footb"><p>Our Company</p>
	
		<ul>
		  <li><a href="#">About us </a></li>
		  <li><a href="#">Reviews  </a></li>
		  <li><a href="#">Jobs  </a></li>
		  <li><a href="#">Terms of Use</a></li>
		</ul>
	</div>
	
	<div id="footc"><p>Getting Started</p>
		<ul>
		  <li><a href="#">Free Trail Offer Details  </a></li>
		  <li><a href="#"> Redeem Your Gift</a></li>
		</ul>
	</div>
</div>
</body>
</html>